.class Les/g4$a;
.super Ljava/lang/Object;
.source "AdbConnection.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Les/g4;->n()Ljava/lang/Thread;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Les/g4;

.field final synthetic b:Les/g4;


# direct methods
.method constructor <init>(Les/g4;Les/g4;)V
    .locals 0

    .line 1
    iput-object p1, p0, Les/g4$a;->b:Les/g4;

    iput-object p2, p0, Les/g4$a;->a:Les/g4;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 5

    .line 1
    :cond_0
    :goto_0
    iget-object v0, p0, Les/g4$a;->b:Les/g4;

    invoke-static {v0}, Les/g4;->a(Les/g4;)Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->isInterrupted()Z

    move-result v0

    if-nez v0, :cond_8

    .line 2
    :try_start_0
    iget-object v0, p0, Les/g4$a;->b:Les/g4;

    invoke-static {v0}, Les/g4;->b(Les/g4;)Ljava/io/InputStream;

    move-result-object v0

    invoke-static {v0}, Les/i4$a;->a(Ljava/io/InputStream;)Les/i4$a;

    move-result-object v0

    .line 3
    invoke-static {v0}, Les/i4;->a(Les/i4$a;)Z

    move-result v1

    if-nez v1, :cond_1

    goto :goto_0

    .line 4
    :cond_1
    iget v1, v0, Les/i4$a;->a:I

    const/4 v2, 0x1

    sparse-switch v1, :sswitch_data_0

    goto :goto_0

    .line 5
    :sswitch_0
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    monitor-enter v1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 6
    :try_start_1
    iget-object v3, p0, Les/g4$a;->a:Les/g4;

    iget v0, v0, Les/i4$a;->c:I

    invoke-static {v3, v0}, Les/g4;->a(Les/g4;I)I

    .line 7
    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "maxData = "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v4, p0, Les/g4$a;->b:Les/g4;

    invoke-static {v4}, Les/g4;->g(Les/g4;)I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 8
    iget-object v0, p0, Les/g4$a;->a:Les/g4;

    invoke-static {v0, v2}, Les/g4;->a(Les/g4;Z)Z

    .line 9
    iget-object v0, p0, Les/g4$a;->a:Les/g4;

    invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V

    .line 10
    monitor-exit v1

    goto :goto_0

    :catchall_0
    move-exception v0

    monitor-exit v1
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    :try_start_2
    throw v0

    .line 11
    :sswitch_1
    iget v1, v0, Les/i4$a;->b:I

    if-ne v1, v2, :cond_0

    .line 12
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    invoke-static {v1}, Les/g4;->e(Les/g4;)Z

    move-result v1

    if-eqz v1, :cond_2

    const/4 v0, 0x3

    .line 13
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    .line 14
    invoke-static {v1}, Les/g4;->f(Les/g4;)Les/h4;

    move-result-object v1

    invoke-virtual {v1}, Les/h4;->a()[B

    move-result-object v1

    .line 15
    invoke-static {v0, v1}, Les/i4;->a(I[B)[B

    move-result-object v0

    goto :goto_1

    :cond_2
    const/4 v1, 0x2

    .line 16
    iget-object v3, p0, Les/g4$a;->a:Les/g4;

    .line 17
    invoke-static {v3}, Les/g4;->f(Les/g4;)Les/h4;

    move-result-object v3

    iget-object v0, v0, Les/i4$a;->g:[B

    invoke-virtual {v3, v0}, Les/h4;->a([B)[B

    move-result-object v0

    .line 18
    invoke-static {v1, v0}, Les/i4;->a(I[B)[B

    move-result-object v0

    .line 19
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    invoke-static {v1, v2}, Les/g4;->b(Les/g4;Z)Z

    .line 20
    :goto_1
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    iget-object v1, v1, Les/g4;->d:Ljava/io/OutputStream;

    invoke-virtual {v1, v0}, Ljava/io/OutputStream;->write([B)V

    .line 21
    iget-object v0, p0, Les/g4$a;->a:Les/g4;

    iget-object v0, v0, Les/g4;->d:Ljava/io/OutputStream;

    invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V

    goto/16 :goto_0

    .line 22
    :sswitch_2
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    invoke-static {v1}, Les/g4;->c(Les/g4;)Z

    move-result v1

    if-nez v1, :cond_3

    goto/16 :goto_0

    .line 23
    :cond_3
    iget-object v1, p0, Les/g4$a;->b:Les/g4;

    invoke-static {v1}, Les/g4;->d(Les/g4;)Ljava/util/HashMap;

    move-result-object v1

    iget v2, v0, Les/i4$a;->c:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Les/j4;

    if-nez v1, :cond_4

    goto/16 :goto_0

    .line 24
    :cond_4
    monitor-enter v1
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    .line 25
    :try_start_3
    iget v2, v0, Les/i4$a;->a:I

    const v3, 0x59414b4f

    if-ne v2, v3, :cond_5

    .line 26
    iget v0, v0, Les/i4$a;->b:I

    invoke-virtual {v1, v0}, Les/j4;->a(I)V

    .line 27
    invoke-virtual {v1}, Les/j4;->g()V

    .line 28
    invoke-virtual {v1}, Ljava/lang/Object;->notify()V

    goto :goto_2

    .line 29
    :cond_5
    iget v2, v0, Les/i4$a;->a:I

    const v3, 0x45545257

    if-ne v2, v3, :cond_6

    .line 30
    iget-object v0, v0, Les/i4$a;->g:[B

    invoke-virtual {v1, v0}, Les/j4;->b([B)V

    .line 31
    invoke-virtual {v1}, Les/j4;->n()V

    goto :goto_2

    .line 32
    :cond_6
    iget v2, v0, Les/i4$a;->a:I

    const v3, 0x45534c43

    if-ne v2, v3, :cond_7

    .line 33
    iget-object v2, p0, Les/g4$a;->a:Les/g4;

    invoke-static {v2}, Les/g4;->d(Les/g4;)Ljava/util/HashMap;

    move-result-object v2

    iget v0, v0, Les/i4$a;->c:I

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/util/HashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;

    .line 34
    invoke-virtual {v1}, Les/j4;->b()V

    .line 35
    :cond_7
    :goto_2
    monitor-exit v1

    goto/16 :goto_0

    :catchall_1
    move-exception v0

    monitor-exit v1
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    :try_start_4
    throw v0
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0

    :catch_0
    move-exception v0

    .line 36
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 37
    :cond_8
    iget-object v0, p0, Les/g4$a;->a:Les/g4;

    monitor-enter v0

    .line 38
    :try_start_5
    iget-object v1, p0, Les/g4$a;->b:Les/g4;

    invoke-static {v1}, Les/g4;->h(Les/g4;)V

    .line 39
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V

    .line 40
    iget-object v1, p0, Les/g4$a;->a:Les/g4;

    const/4 v2, 0x0

    invoke-static {v1, v2}, Les/g4;->c(Les/g4;Z)Z

    .line 41
    monitor-exit v0

    return-void

    :catchall_2
    move-exception v1

    monitor-exit v0
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_2

    goto :goto_4

    :goto_3
    throw v1

    :goto_4
    goto :goto_3

    :sswitch_data_0
    .sparse-switch
        0x45534c43 -> :sswitch_2
        0x45545257 -> :sswitch_2
        0x48545541 -> :sswitch_1
        0x4e584e43 -> :sswitch_0
        0x59414b4f -> :sswitch_2
    .end sparse-switch
.end method
